#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "item.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void paintEvent(QPaintEvent *);
    void mousePressEvent(QMouseEvent *);
    void DrawChessboard();
    void DrawItems();
    void DrawChessAtPoint(QPainter& painter,QPoint& pt);
    void DrawItemWithMouse();
    int CountNearItem(Item item,QPoint ptDirection);
    QVector<Item> Items;
    bool IsBlackTurn;

private:
    Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
